﻿/*
 * Copyright (C) 2021. Huawei Device Co., Ltd. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the MIT License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * MIT License for more details.
 */

#ifndef DUILIB_UICULTURE_INTERFACE_H
#define DUILIB_UICULTURE_INTERFACE_H

#include "../UILib.h"
#include <memory>

namespace DuiLib {

enum LayoutDirection {
    DIRECTION_LTR, // Left - to - right, default 0 value
    DIRECTION_RTL, // Right - to - left text
    DIRECTION_MIXED, // both
};

class UILIB_API UICultureInterface {
public:
    virtual void setResPath(LPCTSTR path) = 0;
    virtual void setLocale(LPCTSTR locale, bool loadAll = true) = 0;
    virtual LayoutDirection getDirection() = 0;
    virtual CDuiString ParseBind(LPCTSTR pstrValue) = 0;
    virtual CDuiString GetString(LPCTSTR key) = 0;
    virtual CDuiString GetLocalString(LPCTSTR key) = 0;
    virtual std::wstring GetLocaleLanguage() = 0;
    virtual void SetCustomFont(wstring fontstr) = 0;
    virtual wstring GetCustomFont() = 0;
    virtual std::wstring GetMultiVarStr(const wstring &strIDS, const vector<int> &vecNum, int count = 0) = 0;
    virtual CDuiString GetMultiVarString(LPCTSTR originalString, ...) = 0;
    virtual std::wstring GetPercentageStr(const int percentage) = 0;
    virtual std::wstring ToUpper(const wstring &src) = 0;
    virtual std::wstring NumberLocalFormat(double value) = 0;
};

} // namespace DuiLib

#endif //!DUILIB_UICULTURE_INTERFACE_H
